﻿.select {
    --bb-dropdown-link-pre-active-bg: #498ff7;
    --bb-select-dropdown-max-height: 274px;
    --bb-select-focus-shadow: none;
    --bb-select-focus-border-color: #c0c4cc;
    --bb-select-hover-border-color: #c0c4cc;
    --bb-select-bg: #fff;
    --bb-select-disabled-bg: #e9ecef;
    --bb-select-disabled-border-color: #e4e7ed;
    --bb-select-disabled-color: #c0c4cc;
}

    .select .dropdown-menu {
        max-height: var(--bb-select-dropdown-max-height);
        overflow-x: hidden;
        width: 100%;
    }

    .select .dropdown-toggle::after {
        content: none;
    }

    .select .form-select {
        background-image: none;
        background-color: var(--bb-select-bg);
        cursor: pointer;
    }

    .select .dropdown-menu {
        margin-top: 8px !important;
    }

.form-select:disabled {
    background-color: var(--bb-select-disabled-bg);
    border-color: var(--bb-select-disabled-border-color);
    color: var(--bb-select-disabled-color);
}

.dropdown-menu-arrow {
    width: 0;
    height: 0;
    border-width: 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent rgba(0,0,0,.15);
    position: absolute;
    left: 20px;
    margin-top: 4px;
    z-index: 1001;
    display: none;
}

    .dropdown-menu-arrow:after {
        content: " ";
        width: 0;
        height: 0;
        border-width: 0 6px 6px;
        border-style: solid;
        border-color: transparent transparent #fff;
        position: absolute;
        top: 1px;
        left: -6px;
    }

.form-select:focus {
    box-shadow: var(--bb-select-focus-shadow);
    border-color: var(--bb-select-focus-border-color);
}

.form-select:not(:disabled):hover {
    border-color: var(--bb-select-hover-border-color);
}

.form-select.show + .form-select-append i {
    transform: rotate(0);
}

.dropdown-menu[data-popper-placement="bottom-start"].show + .dropdown-menu-arrow,
.dropdown-menu[data-bs-popper="none"].show + .dropdown-menu-arrow {
    display: block;
}

.dropdown-menu[data-bs-popper="none"].show + .dropdown-menu-arrow {
    margin-top: 2px;
}

.dropdown-item.preActive {
    color: var(--bs-dropdown-link-active-color);
    text-decoration: none;
    background-color: var(--bb-dropdown-link-pre-active-bg);
}

.form-select-append {
    position: absolute;
    height: 100%;
    width: 30px;
    right: 0;
    top: 0;
    color: #c0c4cc;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .form-select-append i {
        transition: all .3s;
        transform: rotate(180deg);
    }

.show > .form-select-append i {
    transform: rotate(0);
}

.select .search {
    padding: 7px 10px;
    position: relative;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.625rem;
    margin-bottom: 0.5rem;
}

    .select .search .search-text {
        width: 100%;
        padding-right: 30px;
    }

    .select .search .fa-search {
        position: absolute;
        left: calc(100% - 34px);
        top: 18px;
        color: #adb5bd;
    }

.form-select.is-valid:focus,
.was-validated .form-select:valid:focus,
.form-select.is-invalid:focus,
.was-validated .form-select:invalid:focus {
    box-shadow: none;
}

.input-group > .select:not(:first-child) .form-select {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > .select:not(:last-child) .form-select {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.form-select.is-valid:not([multiple]):not([size]),
.form-select.is-valid:not([multiple])[size="1"],
.was-validated .form-select:valid:not([multiple]):not([size]),
.was-validated .form-select:valid:not([multiple])[size="1"],
.form-select.is-invalid:not([multiple]):not([size]),
.form-select.is-invalid:not([multiple])[size="1"],
.was-validated .form-select:invalid:not([multiple]):not([size]),
.was-validated .form-select:invalid:not([multiple])[size="1"] {
    background-position: right -1rem center, center right 1.5rem;
}
